package tech.aistar.entity.daoyou;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;

public class ReservationService implements Serializable{

    private String username;
    @NotNull(message = "账号不能为空")
    @Pattern(regexp = "^1[3|4|5|8][0-9]\\d{4,8}$",message = "{请正确输入手机号}")
    private  String phone;
    @NotNull(message = "日期错误")
    @Pattern(regexp="",message="")
    private Date goDate;
    @NotNull(message = "出发天数错误")
    @Pattern(regexp="([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8])))",message="格式日期yyyy-MM-dd")
    private String days;

    @Override
    public String toString() {
        return "ReservationService{" +
                "username='" + username + '\'' +
                ", phone='" + phone + '\'' +
                ", goDate=" + goDate +
                ", days='" + days + '\'' +
                '}';
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getGoDate() {
        return goDate;
    }

    public void setGoDate(Date goDate) {
        this.goDate = goDate;
    }

    public String getDays() {
        return days;
    }

    public void setDays(String days) {
        this.days = days;
    }

    public ReservationService() {

    }
}
